package com.kimwu.design.mediator.official;

import com.kimwu.design.mediator.monarch.Monarch;

/**
 * 官员（大臣）抽象类
 */
public abstract class Official {

    protected Monarch monarch;

    /**
     * 每个官员必然要与君主有联系
     * @param monarch
     */
    public Official(Monarch monarch){
        this.monarch = monarch;
    }

    /**
     * 在抽象官员类中添加与中介者取得联系的方法
     * @param monarch
     */
    public void setMonarch(Monarch monarch){
        this.monarch = monarch;
    }

}